<template>
  <a-icon
    :type="type"
    :component="component"
    :theme="theme"
    :spin="spin"
    :rotate="rotate"
    @click="handleClick"
  />
</template>

<script>
export default {
  name: 'DIcon',
  props: {
    type: {
      type: String
    },
    component: {
      type: Object
    },
    theme: {
      type: String,
      default: 'outlined'
    },
    spin: {
      type: Boolean,
      default: false
    },
    rotate: {
      type: Number,
      default: 0
    }
  },
  methods: {
    handleClick(e) {
      this.$emit('click', e);
    }
  }
};
</script>

<style lang="scss">
.tw-input-affix-wrapper-sm .tw-input-prefix {
  font-size: 12px;
}
.tw-btn-sm .anticon {
  font-size: 14px;
  line-height: 1.4;
}
</style>
